.class public Lcom/htc/android/footprints/view/MediaControlPanelEditMode;
.super Landroid/widget/LinearLayout;
.source "MediaControlPanelEditMode.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "MediaControlPanelEditMode"


# instance fields
.field deleteListener:Landroid/view/View$OnClickListener;

.field public mCurrentState:I

.field mCurrentTime:Landroid/widget/TextView;

.field mDeleteButton:Landroid/widget/ImageView;

.field mFootprint:Lcom/htc/android/footprints/vo/Footprint;

.field final mHandler:Landroid/os/Handler;

.field mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

.field mProgress:Landroid/widget/ProgressBar;

.field mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

.field mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

.field private mRemainingTime:J

.field mTotalTime:Landroid/widget/TextView;

.field mUpdateTimer:Ljava/lang/Runnable;

.field mediaListener:Lcom/htc/android/footprints/utils/voice/Recorder$OnStateChangedListener;

.field playbackListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;

.field recordListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v0, 0x0

    .line 64
    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 35
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    .line 37
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    .line 39
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    .line 41
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    .line 43
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    .line 45
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    .line 47
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    .line 50
    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 55
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mHandler:Landroid/os/Handler;

    .line 57
    new-instance v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$1;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$1;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mUpdateTimer:Ljava/lang/Runnable;

    .line 127
    new-instance v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$2;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$2;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->deleteListener:Landroid/view/View$OnClickListener;

    .line 186
    new-instance v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$3;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->recordListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;

    .line 209
    new-instance v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->playbackListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;

    .line 265
    new-instance v0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$5;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$5;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mediaListener:Lcom/htc/android/footprints/utils/voice/Recorder$OnStateChangedListener;

    .line 443
    const-wide/16 v0, -0x1

    iput-wide v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    .line 65
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->initView()V

    .line 66
    return-void
.end method

.method static synthetic access$000(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateTimerView()V

    return-void
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 32
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->showToast(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$200(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateUI()V

    return-void
.end method

.method static synthetic access$300(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->calRecordingTime()V

    return-void
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)J
    .locals 2
    .parameter "x0"

    .prologue
    .line 32
    iget-wide v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    return-wide v0
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;J)Ljava/lang/String;
    .locals 1
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 32
    invoke-direct {p0, p1, p2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$600(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 32
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setScreenkeepOn(I)V

    return-void
.end method

.method private calRecordingTime()V
    .locals 8

    .prologue
    const-wide/16 v6, 0x3c

    .line 446
    invoke-static {}, Lcom/htc/android/footprints/utils/StorageUtil;->availableStorage()J

    move-result-wide v0

    .line 447
    .local v0, availableSpace:J
    const-wide/16 v4, 0x0

    cmp-long v4, v0, v4

    if-lez v4, :cond_1

    .line 448
    const-wide/16 v4, 0x87

    div-long v2, v0, v4

    .line 449
    .local v2, tempTime:J
    cmp-long v4, v2, v6

    if-lez v4, :cond_0

    .line 450
    iput-wide v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    .line 455
    .end local v2           #tempTime:J
    :goto_0
    return-void

    .line 451
    .restart local v2       #tempTime:J
    :cond_0
    iput-wide v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    goto :goto_0

    .line 453
    .end local v2           #tempTime:J
    :cond_1
    const-wide/16 v4, -0x1

    iput-wide v4, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    goto :goto_0
.end method

.method private setScreenkeepOn(I)V
    .locals 2
    .parameter "state"

    .prologue
    const/16 v1, 0x80

    .line 300
    packed-switch p1, :pswitch_data_0

    .line 312
    .end local p0
    :goto_0
    return-void

    .line 302
    .restart local p0
    :pswitch_0
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/Window;->clearFlags(I)V

    goto :goto_0

    .line 306
    .restart local p0
    :pswitch_1
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V

    goto :goto_0

    .line 309
    .restart local p0
    :pswitch_2
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V

    goto :goto_0

    .line 300
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
        :pswitch_1
    .end packed-switch
.end method

.method private setupTimer(J)Ljava/lang/String;
    .locals 9
    .parameter "voicelength"

    .prologue
    const-wide/16 v7, 0x3e8

    const-wide/16 v5, 0x3c

    .line 249
    const-wide/16 v0, 0x0

    cmp-long v0, p1, v0

    if-gez v0, :cond_0

    .line 250
    const-string v0, "--:--"

    .line 251
    :goto_0
    return-object v0

    :cond_0
    const-string v0, "%02d:%02d"

    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    div-long v3, p1, v7

    div-long/2addr v3, v5

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x1

    div-long v3, p1, v7

    rem-long/2addr v3, v5

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private showToast(Ljava/lang/String;)V
    .locals 2
    .parameter "showmsg"

    .prologue
    .line 260
    if-eqz p1, :cond_0

    .line 261
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object v0

    const/16 v1, 0xbb8

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 263
    :cond_0
    return-void
.end method

.method private updateButtonControl(I)V
    .locals 6
    .parameter "state"

    .prologue
    const-wide/16 v4, -0x1

    const/4 v1, 0x1

    const/4 v3, 0x0

    .line 376
    packed-switch p1, :pswitch_data_0

    .line 435
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-nez v0, :cond_2

    .line 441
    :cond_0
    :goto_0
    return-void

    .line 378
    :pswitch_0
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 379
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    .line 380
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 381
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 382
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    .line 383
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v3}, Landroid/widget/ProgressBar;->setProgress(I)V

    .line 385
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    const-wide/16 v1, 0x0

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 386
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v0, :cond_0

    .line 388
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 389
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v1, v1, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 390
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 391
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    .line 392
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    .line 393
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->invalidate()V

    goto :goto_0

    .line 395
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-direct {p0, v4, v5}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 396
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    invoke-direct {p0, v4, v5}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 400
    :pswitch_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 401
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 402
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 404
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v0, :cond_0

    .line 407
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v1

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 408
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v1, v1, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 409
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0

    .line 412
    :pswitch_2
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 413
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 414
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 416
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v0, :cond_0

    .line 419
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v1

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 420
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v1, v1, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 421
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0

    .line 424
    :pswitch_3
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 425
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 426
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v0, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setEnabled(Z)V

    .line 427
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v0, :cond_0

    .line 429
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v1

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 432
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0

    .line 437
    :cond_2
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v1

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 438
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v1, v1, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v1, v1

    invoke-direct {p0, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    .line 376
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_3
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method private updateTimerView()V
    .locals 12

    .prologue
    .line 328
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    .line 329
    .local v4, res:Landroid/content/res/Resources;
    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x1

    if-eq v6, v7, :cond_0

    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x2

    if-eq v6, v7, :cond_0

    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x3

    if-ne v6, v7, :cond_5

    :cond_0
    const/4 v6, 0x1

    move v0, v6

    .line 333
    .local v0, ongoing:Z
    :goto_0
    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x1

    if-ne v6, v7, :cond_1

    .line 334
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v6, :cond_1

    .line 335
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v7, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v7}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v7

    int-to-long v7, v7

    invoke-direct {p0, v7, v8}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 336
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    invoke-virtual {v6}, Landroid/widget/ProgressBar;->getMax()I

    move-result v3

    .line 338
    .local v3, progressMax:I
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    iget-object v7, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v7}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v7

    mul-int/2addr v7, v3

    int-to-long v7, v7

    iget-wide v9, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    div-long/2addr v7, v9

    const-wide/16 v9, 0x3e8

    div-long/2addr v7, v9

    long-to-int v7, v7

    invoke-virtual {v6, v7}, Landroid/widget/ProgressBar;->setProgress(I)V

    .line 341
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v6}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v6

    int-to-long v6, v6

    iget-wide v8, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRemainingTime:J

    const-wide/16 v10, 0x3e8

    mul-long/2addr v8, v10

    cmp-long v6, v6, v8

    if-lez v6, :cond_1

    .line 342
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    const/4 v7, 0x0

    invoke-virtual {v6, v7}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    .line 348
    .end local v3           #progressMax:I
    :cond_1
    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x2

    if-ne v6, v7, :cond_2

    .line 349
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    const/4 v7, 0x0

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 350
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-eqz v6, :cond_2

    .line 351
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v6}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v6

    int-to-long v1, v6

    .line 352
    .local v1, pos:J
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    iget-object v7, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v7}, Lcom/htc/android/footprints/utils/voice/Recorder;->progress()I

    move-result v7

    int-to-long v7, v7

    invoke-direct {p0, v7, v8}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 353
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v6, v6, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    if-lez v6, :cond_2

    .line 354
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    iget-object v7, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v7, v7, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v7, v7

    invoke-direct {p0, v7, v8}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 355
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    const-wide/16 v7, 0x3e8

    mul-long/2addr v7, v1

    iget-object v9, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget v9, v9, Lcom/htc/android/footprints/utils/voice/Recorder;->mSampleLength:I

    int-to-long v9, v9

    div-long/2addr v7, v9

    long-to-int v7, v7

    invoke-virtual {v6, v7}, Landroid/widget/ProgressBar;->setProgress(I)V

    .line 360
    .end local v1           #pos:J
    :cond_2
    iget v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    const/4 v7, 0x3

    if-ne v6, v7, :cond_3

    .line 362
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    invoke-virtual {v6}, Landroid/widget/TextView;->getVisibility()I

    move-result v5

    .line 363
    .local v5, vis:I
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    const/4 v7, 0x4

    if-ne v5, v7, :cond_6

    const/4 v7, 0x0

    :goto_1
    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 366
    .end local v5           #vis:I
    :cond_3
    if-eqz v0, :cond_4

    .line 367
    iget-object v6, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mHandler:Landroid/os/Handler;

    iget-object v7, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mUpdateTimer:Ljava/lang/Runnable;

    const-wide/16 v8, 0x1f4

    invoke-virtual {v6, v7, v8, v9}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 368
    :cond_4
    return-void

    .line 329
    .end local v0           #ongoing:Z
    :cond_5
    const/4 v6, 0x0

    move v0, v6

    goto/16 :goto_0

    .line 363
    .restart local v0       #ongoing:Z
    .restart local v5       #vis:I
    :cond_6
    const/4 v7, 0x4

    goto :goto_1
.end method

.method private updateUI()V
    .locals 1

    .prologue
    .line 371
    iget v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentState:I

    invoke-direct {p0, v0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateButtonControl(I)V

    .line 372
    invoke-direct {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateTimerView()V

    .line 373
    return-void
.end method


# virtual methods
.method initView()V
    .locals 7

    .prologue
    const-wide/16 v5, -0x1

    const/4 v4, 0x0

    .line 69
    invoke-virtual {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "layout_inflater"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 72
    .local v0, inflater:Landroid/view/LayoutInflater;
    const v2, 0x7f03001a

    invoke-virtual {v0, v2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/view/ViewGroup;

    .line 73
    .local v1, layout:Landroid/view/ViewGroup;
    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->addView(Landroid/view/View;)V

    .line 74
    const v2, 0x7f0c0086

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    .line 75
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mDeleteButton:Landroid/widget/ImageView;

    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->deleteListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 77
    const v2, 0x7f0c0080

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/htc/android/footprints/commonui/SwitchButton;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    .line 78
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecordButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->recordListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;

    invoke-virtual {v2, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setOnCheckedChangeListener(Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;)V

    .line 80
    const v2, 0x7f0c0081

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/htc/android/footprints/commonui/SwitchButton;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    .line 81
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->playbackListener:Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;

    invoke-virtual {v2, v3}, Lcom/htc/android/footprints/commonui/SwitchButton;->setOnCheckedChangeListener(Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;)V

    .line 82
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    invoke-virtual {v2, v4}, Lcom/htc/android/footprints/commonui/SwitchButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 84
    const v2, 0x7f0c0083

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    .line 85
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mCurrentTime:Landroid/widget/TextView;

    invoke-direct {p0, v5, v6}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 86
    const v2, 0x7f0c0084

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    .line 87
    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mTotalTime:Landroid/widget/TextView;

    invoke-direct {p0, v5, v6}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->setupTimer(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 88
    const v2, 0x7f0c0085

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ProgressBar;

    iput-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mProgress:Landroid/widget/ProgressBar;

    .line 113
    return-void
.end method

.method public resetState()V
    .locals 0

    .prologue
    .line 256
    return-void
.end method

.method public setFootprintData(Lcom/htc/android/footprints/vo/Footprint;)V
    .locals 2
    .parameter "data"

    .prologue
    .line 116
    if-nez p1, :cond_0

    .line 125
    :goto_0
    return-void

    .line 119
    :cond_0
    iput-object p1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    .line 120
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    if-nez v0, :cond_1

    new-instance v0, Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-direct {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;-><init>()V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    .line 123
    :goto_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mediaListener:Lcom/htc/android/footprints/utils/voice/Recorder$OnStateChangedListener;

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->setOnStateChangedListener(Lcom/htc/android/footprints/utils/voice/Recorder$OnStateChangedListener;)V

    .line 124
    invoke-direct {p0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateUI()V

    goto :goto_0

    .line 121
    :cond_1
    new-instance v0, Lcom/htc/android/footprints/utils/voice/Recorder;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, v1, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    invoke-direct {v0, v1}, Lcom/htc/android/footprints/utils/voice/Recorder;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    goto :goto_1
.end method

.method public stopMediaControlPanel()V
    .locals 2

    .prologue
    .line 316
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-nez v0, :cond_0

    .line 325
    :goto_0
    return-void

    .line 317
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;->stop()V

    .line 318
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    if-eqz v0, :cond_1

    .line 319
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 320
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    .line 321
    iget-object v0, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mFootprint:Lcom/htc/android/footprints/vo/Footprint;

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    .line 324
    :cond_1
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateButtonControl(I)V

    goto :goto_0
.end method
